#!/usr/bin/env bash
set -euo pipefail
cargo fmt --all
cargo clippy --all-targets --all-features -- -D warnings
cargo test || true
cargo publish --dry-run
read -p "Proceed cargo publish? (y/N): " yn
[[ "$yn" =~ ^[Yy]$ ]] && cargo publish || echo "aborted."
